package edu.calvin.djs32.cs214.interpreters.drivers;

import java.io.IOException;

import org.antlr.runtime.ANTLRFileStream;
import org.antlr.runtime.RecognitionException;

import edu.calvin.cs214.hobbes2008.HobbesTIR;
import edu.calvin.cs214.hobbes2008.IntegerTIR;
import edu.calvin.djs32.cs214.interpreters.frontend.Hobbes2008FrontEnd;
import edu.calvin.djs32.cs214.interpreters.plusone.PlusOneInterpreter;

public class PlusOneInterpreterCLIDriver {
	public static void main(String[] args) throws IOException,RecognitionException {
		HobbesTIR process = new Hobbes2008FrontEnd().process(new ANTLRFileStream("input.hob"));
		int integer = ((IntegerTIR) process).getInt();
		System.out.println(new PlusOneInterpreter().interpret(integer));
	}
}
